#ifndef _LINGXING_
#define _LINGXING_
#include "HardwareInfo.c"
#include "delayLineGo.c"
#include "gotocode.c"
#include "TurnFun.c"

void lingxing(int exit, double k)
{
    if ( exit==1 )
    {
        delayLineGo(107, 1, k);
        gotocode(40, 3);
        TurnFun(-25, 55, 3, 3, 1);
        delayLineGo(7, 1, k);
        TurnFun(55, 55, 1, 0, 0);
        gotocode(40, 2);
        TurnFun(-25, 55, 3, 3, 1);
    }
    else
    {
        if ( exit==2 )
        {
            delayLineGo(107, 1, k);
            gotocode(40, 3);
            TurnFun(-25, 55, 3, 3, 1);
            delayLineGo(7, 1, k);
            gotocode(40, 3);
            TurnFun(50, -25, 5, 20, 1);
            delayLineGo(7, 1, k);
            TurnFun(55, 55, 1, 0, 0);
            TurnFun(-45, 55, 4, 0, 1);
        }
        else
        {
            if ( exit==3 )
            {
                delayLineGo(107, 1, k);
                gotocode(40, 3);
                TurnFun(-25, 55, 3, 3, 1);
                delayLineGo(7, 1, k);
                gotocode(40, 3);
                TurnFun(50, -25, 5, 20, 1);
                delayLineGo(7, 1, k);
                gotocode(40, 3);
                TurnFun(55, -25, 5, 20, 1);
                delayLineGo(7, 1, k);
                TurnFun(55, 55, 1, 0, 0);
                TurnFun(0, 60, 3, 10, 1);
            }
            else
            {
                if ( exit==11 )
                {
                    delayLineGo(107, 1, k);
                    gotocode(40, 3);
                    TurnFun(55, -25, 5, 3, 1);
                    delayLineGo(1, 1, k);
                    TurnFun(55, 55, 7, 0, 0);
                    gotocode(40, 2);
                    TurnFun(55, -25, 5, 3, 1);
                }
                else
                {
                    if ( exit==22 )
                    {
                        delayLineGo(107, 1, k);
                        gotocode(40, 3);
                        TurnFun(55, -25, 5, 3, 1);
                        delayLineGo(1, 1, k);
                        gotocode(40, 3);
                        TurnFun(-25, 55, 3, 3, 1);
                        delayLineGo(1, 1, k);
                        TurnFun(55, 55, 7, 0, 0);
                        gotocode(40, 2);
                        TurnFun(55, -25, 5, 3, 1);
                    }
                    else
                    {
                        delayLineGo(107, 1, k);
                        gotocode(40, 3);
                        TurnFun(55, -25, 5, 3, 1);
                        delayLineGo(1, 1, k);
                        gotocode(40, 3);
                        TurnFun(-25, 55, 3, 3, 1);
                        delayLineGo(1, 1, k);
                        gotocode(40, 3);
                        TurnFun(-25, 55, 3, 3, 1);
                        delayLineGo(1, 1, k);
                        TurnFun(55, 55, 7, 0, 0);
                        gotocode(40, 2);
                        TurnFun(55, -25, 5, 3, 1);
                    }
                }
            }
        }
    }
}
#endif

